﻿<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Our Love Story-Download by http://www.codefans.net</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style type="text/css">
        @font-face {
            font-family: digit;
            src: url('digital-7_mono.ttf') format("truetype");
        }
    </style>
    <link href="style/default.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="style/jquery.js"></script>
    <script type="text/javascript" src="style/garden.js"></script>
    <script type="text/javascript" src="style/functions.js"></script>
</head>

<body>
    <div id="mainDiv">
        <div id="content">
            <div id="code">
                <span class="comments">/**</span><br />
                <span class="space"/><span class="comments">* 顿顿,很开心能认识你,在认识你之后的每一天都很开心,每天都想见到你,</span><br />
                <span class="space"/><span class="comments">* 每天都想把所有的话说给你听,也想未来的每一天都能有你,</span><br />
                <span class="space"/><span class="comments">* 所以,我想用程序员的方式来和你表白.</span><br />
                <span class="space"/><span class="comments">*/</span><br />
                Boy i = <span class="keyword">new</span> Boy(<span class="string">"维维"</span>);<br />
                Girl u = <span class="keyword">new</span> Girl(<span class="string">"顿顿"</span>);<br />
                <span class="comments">// April 08 22:39, 2021, I met you. </span><br />
                i.met(u);<br />
                <span class="comments">// u and i beccame us(cp) .</span><br />
                <span class="keyword">var</span> we = i + u;<br />
                <span class="comments">// and, we talked a lot that night.</span><br />
                we.sayLotsOf();<br />
                <span class="comments">// Since then, we have been looking forward to it every day .</span><br />
                <span class="keyword">var</span> relationship=keepContach(i,u);<br />
                <span class="comments">//  we are getting more and more familiar with each other .</span><br />
                for(var day=0;day++;day<(i.life+u.life)) relationship++;<br />
                <span class="comments">// April 23 23:50, 2021. i finally hold your hand</span><br />
                i.holdHand(u);<br />
                <span class="comments">// And you gave me a hugGoodBye back.</span><br />
                hugEachOther(i,u);<br />
                <span class="comments">// so lucky to have you.</span><br />
                <span class="keyword">boolean</span> isAccept = <span class="keyword">false</span>;<br />
                <span class="keyword">while</span> (isAccept) {<br />
                <span class="placeholder"/>i.waitFor(u);<br />
                <span class="placeholder"/><span class="comments">// I think it is an important decision</span><br />
                <span class="placeholder"/>isAccept = u.thinkOver();<br />
                }<br />
                <span class="comments">// After a please sound of accept, we will live happily ever after.</span><br />
                u.accept(i);<br />
                i.liveHappilyWith(u);<br />
            </div>
            <div id="loveHeart">
                <canvas id="garden"></canvas>
                <div id="words">
                    <div id="messages">
                        <center>
                        </center>
                        顿顿,这是我们在一起的时光。
                        <div id="elapseClock" style="display:none"></div>
                        <a href='#' id="accept">答应我的话,点一下这里</a>
                    </div>
                    <div id="loveu">
                        I love you three thousand.<br/>
                        <div class="signature">- 维维</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        var offsetX = $("#loveHeart").width() / 2;
        var offsetY = $("#loveHeart").height() / 2 - 55;
        
        if (!document.createElement('canvas').getContext) {
            var msg = document.createElement("div");
            msg.id = "errorMsg";
            msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+"; 
            document.body.appendChild(msg);
            $("#code").css("display", "none")
            $("#copyright").css("position", "absolute");
            $("#copyright").css("bottom", "10px");
            document.execCommand("stop");
        } else {
            setTimeout(function () {
                adjustWordsPosition();
                startHeartAnimation();
            }, 10000);
            
            $("#accept").click(function(){
                $(this).hide();
                $("#elapseClock").show();
                var together = new Date('2021-04-08 22:39:00');
                timeElapse(together);
                setInterval(function () {
                    timeElapse(together);
                }, 500);
            })
            adjustCodePosition();
            $("#code").typewriter();
        }
    </script>
</body>
</html>
